// 创建一个新的 store 实例
export default ({
  namespaced: true,
  state() {
    return {
      name: 'ssss',
      age: 20
    }
  },
  mutations: {
    addAge(state, newAge) {
      state.age += newAge
    },
    reAge(state, newAge) {
      state.age = 20
    },
    aaaAge(state, newAge) {
      state.age = newAge
    }
  },
  actions: {
    timeAge(store, newAge) {
      setTimeout(() => {
        store.commit('aaaAge', newAge)
      }, 5000)
    }
  },
  getters: {}
})
